package com.csnf.controller;


import com.csnf.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/account")
public class AccountController {
    @Autowired
    AccountService accountService;

    //更新账号余额
    @RequestMapping("/updateAccount")
    public String updateAccount(String userId,int money){
        int r = accountService.updateAccount(userId,money);
        if(r>0){
            return "success";
        }else{
            return "fail";
        }
    }
}
